package com.eliota.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.eliota.controller.dto.ProjectDto;
import com.eliota.entity.ProjectUser;
import com.eliota.mapper.ProjectMapper;
import com.eliota.mapper.ProjectUserMapper;
import com.eliota.service.ProjectUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.annotation.Resources;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author MG
 * @since 2023-04-01
 */
@Service
public class ProjectUserServiceImpl extends ServiceImpl<ProjectUserMapper, ProjectUser> implements ProjectUserService {

    @Resource
    public ProjectUserMapper projectUserMapper;

    @Override
    public void addUser(ProjectDto projectDto) {

        ProjectUser projectUser = new ProjectUser();
        projectUser.setUserId(projectDto.getUserId());
        projectUser.setProjectId(projectDto.getProjectId());
        System.out.println("+++++++++++++++++++"+projectUser.getProjectId() + projectUser.getUserId());
        projectUserMapper.insert(projectUser);

    }
}
